package com.boyunv.strategy.example02;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/14 21:51
 *@version 1.0
 */

import java.util.List;

public class Client {
    public static void main(String[] args) {
        List<Receipt> receiptList = ReceiptBuilder.getReceiptList();
        for (Receipt receipt : receiptList) {
            if ("MT1101".equals(receipt.getType())){
                System.out.println("接收到MT1101的回执信息");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑A......");
            }else if ("MT1102".equals(receipt.getType())){
                System.out.println("接收到MT1102的回执信息");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑B.....");
            }else if ("MT1103".equals(receipt.getType())){
                System.out.println("接收到MT1103的回执信息");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑B.....");
            }else if ("MT1104".equals(receipt.getType())){
                System.out.println("接收到MT1104的回执信息");
                System.out.println("解析回执内容");
                System.out.println("执行业务逻辑B.....");
            }
        }
    }
 
}
